package com.tuiyun.jxgl.action;

import org.springframework.transaction.annotation.Transactional;

import com.tuiyun.jxgl.bean.Student;
import com.tuiyun.jxgl.dao.StudentHome;

public class ViewStudentAction {
	
	private int studentid;
	
	private Student student;
	
	private StudentHome sh;
	@Transactional
	public String execute(){
		student = sh.findById(studentid);
		if(student == null){
			return "error";
		}
		return "success";
	}

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	public int getStudentid() {
		return studentid;
	}

	public void setStudentid(int studentid) {
		this.studentid = studentid;
	}

	public Student getS() {
		return student;
	}

	public void setS(Student s) {
		this.student = s;
	}

	public StudentHome getSh() {
		return sh;
	}

	public void setSh(StudentHome sh) {
		this.sh = sh;
	}
}
